﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls.Primitives;
using System.Windows;
using System.Windows.Data;
using System.Windows.Controls;

namespace Sinacor.Infra.UI.Controls.SmartClient
{
    public class SinacorTreeViewToggleButton : ToggleButton
    {
        #region ExpandedState
        public static readonly DependencyProperty ExpandedStateProperty = DependencyProperty.Register("ExpandedState", typeof(object), typeof(SinacorTreeViewToggleButton), new FrameworkPropertyMetadata(null));

        public object ExpandedState
        {
            get { return (object)GetValue(ExpandedStateProperty); }
            set { SetValue(ExpandedStateProperty, value); }
        }

        public static readonly DependencyProperty ExpandedStateStringFormatProperty = DependencyProperty.Register("ExpandedStateStringFormat", typeof(string), typeof(SinacorTreeViewToggleButton), new FrameworkPropertyMetadata(null));

        public string ExpandedStateStringFormat
        {
            get { return (string)GetValue(ExpandedStateStringFormatProperty); }
            set { SetValue(ExpandedStateStringFormatProperty, value); }
        }

        public static readonly DependencyProperty ExpandedStateTemplateProperty = DependencyProperty.Register("ExpandedStateTemplate", typeof(DataTemplate), typeof(SinacorTreeViewToggleButton), new FrameworkPropertyMetadata(null));

        public DataTemplate ExpandedStateTemplate
        {
            get { return (DataTemplate)GetValue(ExpandedStateTemplateProperty); }
            set { SetValue(ExpandedStateTemplateProperty, value); }
        }

        public static readonly DependencyProperty ExpandedStateTemplateSelectorProperty = DependencyProperty.Register("ExpandedStateTemplateSelector", typeof(DataTemplateSelector), typeof(SinacorTreeViewToggleButton), new FrameworkPropertyMetadata(null));

        public DataTemplateSelector ExpandedStateTemplateSelector
        {
            get { return (DataTemplateSelector)GetValue(ExpandedStateTemplateSelectorProperty); }
            set { SetValue(ExpandedStateTemplateSelectorProperty, value); }
        }
        #endregion

        #region CollapsedState
        public static readonly DependencyProperty CollapsedStateProperty = DependencyProperty.Register("CollapsedState", typeof(object), typeof(SinacorTreeViewToggleButton), new FrameworkPropertyMetadata(null));

        public object CollapsedState
        {
            get { return (object)GetValue(CollapsedStateProperty); }
            set { SetValue(CollapsedStateProperty, value); }
        }

        public static readonly DependencyProperty CollapsedStateStringFormatProperty = DependencyProperty.Register("CollapsedStateStringFormat", typeof(string), typeof(SinacorTreeViewToggleButton), new FrameworkPropertyMetadata(null));

        public string CollapsedStateStringFormat
        {
            get { return (string)GetValue(CollapsedStateStringFormatProperty); }
            set { SetValue(CollapsedStateStringFormatProperty, value); }
        }

        public static readonly DependencyProperty CollapsedStateTemplateProperty = DependencyProperty.Register("CollapsedStateTemplate", typeof(DataTemplate), typeof(SinacorTreeViewToggleButton), new FrameworkPropertyMetadata(null));

        public DataTemplate CollapsedStateTemplate
        {
            get { return (DataTemplate)GetValue(CollapsedStateTemplateProperty); }
            set { SetValue(CollapsedStateTemplateProperty, value); }
        }

        public static readonly DependencyProperty CollapsedStateTemplateSelectorProperty = DependencyProperty.Register("CollapsedStateTemplateSelector", typeof(DataTemplateSelector), typeof(SinacorTreeViewToggleButton), new FrameworkPropertyMetadata(null));

        public DataTemplateSelector CollapsedStateTemplateSelector
        {
            get { return (DataTemplateSelector)GetValue(CollapsedStateTemplateSelectorProperty); }
            set { SetValue(CollapsedStateTemplateSelectorProperty, value); }
        }
        #endregion

        #region EmptyState
        public static readonly DependencyProperty EmptyStateProperty = DependencyProperty.Register("EmptyState", typeof(object), typeof(SinacorTreeViewToggleButton), new FrameworkPropertyMetadata(null));

        public object EmptyState
        {
            get { return (object)GetValue(EmptyStateProperty); }
            set { SetValue(EmptyStateProperty, value); }
        }

        public static readonly DependencyProperty EmptyStateStringFormatProperty = DependencyProperty.Register("EmptyStateStringFormat", typeof(string), typeof(SinacorTreeViewToggleButton), new FrameworkPropertyMetadata(null));

        public string EmptyStateStringFormat
        {
            get { return (string)GetValue(EmptyStateStringFormatProperty); }
            set { SetValue(EmptyStateStringFormatProperty, value); }
        }

        public static readonly DependencyProperty EmptyStateTemplateProperty = DependencyProperty.Register("EmptyStateTemplate", typeof(DataTemplate), typeof(SinacorTreeViewToggleButton), new FrameworkPropertyMetadata(null));

        public DataTemplate EmptyStateTemplate
        {
            get { return (DataTemplate)GetValue(EmptyStateTemplateProperty); }
            set { SetValue(EmptyStateTemplateProperty, value); }
        }

        public static readonly DependencyProperty EmptyStateTemplateSelectorProperty = DependencyProperty.Register("EmptyStateTemplateSelector", typeof(DataTemplateSelector), typeof(SinacorTreeViewToggleButton), new FrameworkPropertyMetadata(null));

        public DataTemplateSelector EmptyStateTemplateSelector
        {
            get { return (DataTemplateSelector)GetValue(EmptyStateTemplateSelectorProperty); }
            set { SetValue(EmptyStateTemplateSelectorProperty, value); }
        }
        #endregion

        #region HasItems
        public static readonly DependencyProperty HasItemsProperty = DependencyProperty.Register("HasItems", typeof(bool), typeof(SinacorTreeViewToggleButton), new FrameworkPropertyMetadata(false));
        
        public bool HasItems
        {
            get { return (bool)GetValue(HasItemsProperty); }
            set { SetValue(HasItemsProperty, value); }
        }
        #endregion
    }
}
